//
//  APITestVC.swift
//  GHSwiftProject
//
//  Created by Guanghui Liao on 4/10/18.
//  Copyright © 2018 liaoworking. All rights reserved.
//

import UIKit

class APITestVC: GHBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        testSendMSG()
        
        GHLocationManager.shared.startLocating(showAlert: true).didLocatedBlock = { (longi, lati) in
            print("test调取了一次")
            print(longi)
            print(lati)
        }

    }
    
    //发送短信--已经测通
    func testSendMSG() {
        var para = [String:Any]()
        para["send_flag_"] = "MSG_SMS_VERIFY_"//短信验证码
        para["send_phone_"] = "18817381480"
        para["send_type_"] = "1" //发送类型
        para["ver_code_flag_"] = UUID //图形验证码的uuid
        para["ver_code_value_"] = "hybh"//图形验证码
        para["service_platform_type_"] = "1"//来自
        
        NetWorkRequest(.sendSMS(parameters: para)) { (resultString) -> (Void) in
            
        }
    }
    
    //测试短信登陆/注册
    func testLoginAPI() {
        var para = [String:Any]()
        para["sms_code_"] = ""//短信验证码
        para["mobile_phone_"] = "18817381480"
        para["open_id_"] = "1" //发送类型

        NetWorkRequest(.loginByMsg(parameters: para)) { (resultString) -> (Void) in
        }
    }
    
    //测试账号密码登陆
    func testLoginByPwd() {
        var para = [String:Any]()
        para["sms_code_"] = ""//短信验证码
        para["mobile_phone_"] = "18817381480"
        para["open_id_"] = "1" //发送类型
        
        NetWorkRequest(.loginByMsg(parameters: para)) { (resultString) -> (Void) in
        }
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
